package cn.wolfcode.service.impl;

import cn.wolfcode.mapper.CustomerReportMapper;
import cn.wolfcode.query.QueryObject;
import cn.wolfcode.service.ICustomerReportService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class CustomerReportServiceImpl implements ICustomerReportService {

	@Autowired
	private CustomerReportMapper customerReportMapper;

	public PageInfo<HashMap> selectCustomerReport(QueryObject qo) {
		PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
		List<HashMap> list = customerReportMapper.selectCustomerReport(qo);
		return new PageInfo<HashMap>(list);
	}
}
